﻿using Business_Layer;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;

namespace Control_Layer
{
    // See UseCase:
    // UCD04-PREVIEWS (00)
    public class CCPreviewComponent
    {
        private Service service;
        private Project project;

        public CCPreviewComponent()
        {
            service = Service.GetInstance;
            project = service.GetProject;
        }

        /// <summary>
        /// Preview a body while making a selection on the screen.
        /// </summary>
        /// <param name="sx">The X Coordinate to start previewing.</param>
        /// <param name="sy">The Y Coordinate to start previewing.</param>
        /// <param name="ex">The X Coordinate to end previewing.</param>
        /// <param name="ey">The Y Coordinate to end previewing.</param>
        /// <returns></returns>
        public Bitmap PreviewBody(int sx, int sy, int ex, int ey)
        {
            return project.PreviewComponent(TypeComponent.Body, sx, sy, ex, ey);
        }

        public Bitmap PreviewRelation(int sx, int sy, int ex, int ey)
        {
            return project.PreviewComponent(TypeComponent.Relation, sx, sy, ex, ey);
        }

        public Bitmap PreviewPicture(int sx, int sy, int ex, int ey)
        {
            return project.PreviewComponent(TypeComponent.Picture, sx, sy, ex, ey);
        }
    }
}
